package work.MrSun.xyq.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import work.MrSun.xyq.model.XyqCategory;
import work.MrSun.xyq.service.XyqCategoryService;

import java.util.List;

/**
 * @Author MrSun
 * @Date 2023/4/9 19:59
 */

/**
 * 获取分类的控制层
 */
@RestController
public class XyqCategoryController {
    @Autowired
    private XyqCategoryService xyqCategoryService;

    @PostMapping("/getMessage/getAllCategoryMessage")
    public List<XyqCategory> getAllCategoryMessage(){
        return xyqCategoryService.findAll();
    }
}
